<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>吉车惠后台管理系统</title>
	<%@include file="/global/global-other.jsp" %>
	<script type="text/javascript">
		var $bn_oilStaion_map = new Object();
		var $bn_oilStaion_map_Datagrid;
		var viewDialog_map = null;
		var $bn_oilStaion_worker_list_toolbar = [{
			text:'<i class="fa fa-search " aria-hidden="true"></i>查询',
			handler:function(){
				$bn_oilStaion_worker_list.reload();
			}
		},
			{
				text:'<i class="fa fa-retweet" aria-hidden="true"></i>查看详情',
				handler:function(){
					$bn_oilStaion_worker_list.saveInit();
				}
			},
			{
				text:'<i class="fa fa-random" aria-hidden="true"></i>油卡解绑',
				handler:function(){
					$bn_oilStaion_worker_list.updateInit();
				}
			}
		];
		function ww4(date){
			var y = date.getFullYear();
			var m = date.getMonth()+1;
			var d = date.getDate();
			var h = date.getHours();
			var milis = date.getMinutes();
			var ss = date.getSeconds();
			return  y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d)+' '+(h<10?('0'+h):h)+':'+(milis<10?('0'+milis):milis)+':'+(ss<10?('0'+ss):ss);

		}
		function w4(s){
			var reg=/[\u4e00-\u9fa5]/  //利用正则表达式分隔
			var ss = (s.split(reg));
			var y = parseInt(ss[0],10);
			var m = parseInt(ss[1],10);
			var d = parseInt(ss[2],10);
			var h = parseInt(ss[3],10);
			if (!isNaN(y) && !isNaN(m) && !isNaN(d) && !isNaN(h)){
				return new Date(y,m-1,d,h);
			} else {
				return new Date();
			}
		}
		function setTime(time){
			alert(time);
			$("#test").val(time);
		}
		$(function() {
			submitForm = function($dialog,$grid){
				$('#an_car_form').form('submit',{
					onSubmit:function(){
						if($(this).form('enableValidation').form('validate')){
							return true;
						}else{
							return false;
						}
					},
					success:function(data){
						var an_car_form = $('#an_car_form');
						$.post('${ctx}/bn/appuser/insert?_m=exec&r='+Math.random(), an_car_form.formSerialize(), function(json) {
							var errcode = json.errcode;
							var errmsg = json.errmsg;
							if(errcode == '1'){
								$.messager.alert("提示",errmsg,"error");
							}else{
								$.messager.alert("提示","保存成功！","info",function(){
									$dialog.dialog('destroy');
									$grid.datagrid('reload');
								});
							}
						}, "JSON");
					}
				});
			};

			$('#tt').tabs({
				border:true,
				closable : false,
				onSelect:function(title){
					var appUserId = $("#appUserId").val();
					if(title =="地址信息"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/address/search?_m=init&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'地址信息',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
					else if(title =="车辆信息"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/car/search?_m=init&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'车辆信息',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
					else if(title =="驾照信息"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/driving/search?_m=init&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'驾照信息',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
					else if(title =="套餐返还"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/package/search?_m=init&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'套餐返还',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
					else if(title =="商品兑换"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/exchange/search?_m=appUserInit&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'商品兑换',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
					else if(title =="积分兑换"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/credit/search?_m=appUserInit&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'积分兑换',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
					else if(title =="中奖信息"){
						var tab = $('#tt').tabs('getSelected');
						var content = '<iframe class=iframe_ name=mainFrame src=${ctx}/an/award/search?_m=appUserInit&appUserId='+appUserId+' allowTransparency=true, style=border:0;width:100%;height:465px; ,frameBorder=0></iframe>';
						$("#tt").tabs('update',{
							tab: tab,
							options:{
								title:'中奖信息',
								content : content,
								fit : true
							}
						});
						tab.panel('refresh');
					}
				}
			});

		});
	</script>
</head>
<body>
<div class="form-box">
	<div class="form-body">
				<div id="tt" class="easyui-tabs" style="width:100%;height:500px;">
					<div title="基本信息" style="padding:20px;display:none;">
						<form role="form" name="an_car_form" id="an_car_form" class="easyui-form form form-horizontal" data-options="novalidate:true">
							<input type="hidden" id="appUserId" name="appUserId" value="${anAppUserEntity.appUserId}">
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">手机号：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text"  id="phone" name="phone" value="${anAppUserEntity.phone}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled" >
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">姓名：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="name" name="name" value="${anAppUserEntity.name}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">昵称：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="nickName" name="nickName" value="${anAppUserEntity.nickName}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">性别：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="sex" name="sex" value="${anAppUserEntity.sexName}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">年龄段：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="ages" name="ages" value="${anAppUserEntity.ages}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">省份：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="provinceCode" name="provinceCode" value="${anAppUserEntity.provinceCode}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">城市：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="cityCode" name="cityCode" value="${anAppUserEntity.cityCode}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">行业：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="trade" name="trade" value="${anAppUserEntity.trade}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">实名认证：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="certification" name="certification" value="" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">冻结状态：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="freezeStatus" name="freezeStatus" value="${anAppUserEntity.freezeStatusStr}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">锁定状态：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="lockStatus" name="lockStatus" value="${anAppUserEntity.lockStatusStr}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">首冲状态：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="firstPayMark" name="firstPayMark" value="${anAppUserEntity.firstPayMarkStr}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">注册时间：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="registerAt" name="registerAt" value="${anAppUserEntity.registerAtStr}"  class="form-control easyui-validatebox" data-options="formatter:ww4,parser:w4" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">最后一次登录时间：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="lastLoginAt" name="lastLoginAt" value="${anAppUserEntity.lastLoginAtStr}" class="form-control easyui-validatebox" data-options="" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">最后一次签到时间：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="lastSigninAt" name="lastSigninAt" value="${anAppUserEntity.lastSigninAtStr}" class="form-control easyui-validatebox" data-options="formatter:ww4,parser:w4" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">邀请码：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="invitationCode" name="invitationCode" value="${anAppUserEntity.invitationCode}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
						</form>
					</div>
					<div title="账户信息" style="padding:20px;">
						<form role="form" name="ss" id="ss" class="easyui-form form form-horizontal" data-options="novalidate:true">
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">手机号：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="phone_account" name="phone_account" value="${anAppUserEntity.phone}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled" >
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">姓名：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="name_account" name="name_account" value="${anAppUserEntity.name}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">油卡余额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="oilcardBalance" name="oilcardBalance" value="${anAppUserAccountEntity.oilcardBalance}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">充值总金额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="oilcardTotalRechargeMoney" name="oilcardTotalRechargeMoney" value="${anAppUserAccountEntity.oilcardTotalRechargeMoney}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">支出总金额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="oilcardTotalExpendMoney" name="oilcardTotalExpendMoney" value="${anAppUserAccountEntity.oilcardTotalExpendMoney}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">油卡待反金额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="oilcardBackMoney" name="oilcardBackMoney" value="${anAppUserAccountEntity.oilcardBackMoney}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">油卡待反截止日期：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="oilcardBackEndDate" name="oilcardBackEndDate" value="${anAppUserAccountEntity.oilcardBackEndDateStr}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">积分余额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="integralBalance" name="integralBalance" value="${anAppUserAccountEntity.integralBalance}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">积分累计获得：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="integralTotalGain" name="integralTotalGain" value="${anAppUserAccountEntity.integralTotalGain}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">积分累计支出：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="integralTotalExpend" name="integralTotalExpend" value="${anAppUserAccountEntity.integralTotalExpend}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required"  validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">账户余额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="accountBalance" name="accountBalance" value="${anAppUserAccountEntity.accountBalance}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">总充值金额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="totalRechargeMoney" name="totalRechargeMoney" value="${anAppUserAccountEntity.totalRechargeMoney}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">总支出金额：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="totalExpendMoney" name="totalExpendMoney" value="${anAppUserAccountEntity.totalExpendMoney}"  class="form-control easyui-validatebox"  style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">抽奖剩余次数：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="luckyDrawNum" name="luckyDrawNum" value="${anAppUserAccountEntity.luckyDrawNum}" class="form-control easyui-validatebox"  style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									<p class="label-txt">分享总次数：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="shareNum" name="shareNum" value="${anAppUserAccountEntity.shareNum}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
								<label class="col-sm-2 control-label">
									<p class="label-txt">签到总次数：</p>
									<p class="star">*</p>
								</label>
								<div class="col-sm-3">
									<input type="text" id="signinTotalNum" name="signinTotalNum" value="${anAppUserAccountEntity.signinTotalNum}" class="form-control easyui-validatebox" style="width:100%;height:34px;line-height:34px;" required="required" validType="length[1,10]" disabled="disabled">
								</div>
							</div>
						</form>
					</div>
					<div title="地址信息">

					</div>
					<div title="车辆信息">

					</div>
					<div title="驾照信息">

					</div>
					<div title="套餐返还">

					</div>
					<div title="商品兑换">

					</div>
					<div title="积分兑换">

					</div>
					<div title="中奖信息">

					</div>
				</div>

	</div>
</div>
</body>
</html>